import { defineStore } from "pinia";
import { ref } from "vue";

export const useChannelStore = defineStore('channel', () => {
    // 频道列表 0: 推荐
    const channelId = ref(0)

    // 修改频道 id 的回调函数 传递给子组件 子组件调用后回传 id
    const updateChannelId = (id: number) => {
        channelId.value = id
    }
    return {
        channelId,
        updateChannelId
    }

})